Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to hide coordinates from command output #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wotnak
Copy link

@wotnak wotnak commented Jul 1, 2023

Adds show-coordinates option to the config that depending on configured value hides/shows coordinates in commands output.
Available configuration values:

  • default - (default) coordinates will be hidden if reducedDebugInfo gamerule is set to true,
  • true - coordinates will always be shown,
  • false - coordinates will always be hidden.

New permission invunload.coordinates is also added that allows to always show coordinates for a specific player/group even when the plugin is configured to not show coordinates.

Resolves second point from #58. The third point is also effectively resolved since when show-coordinates is set to false no summaries will be displayed.

by default use reducedDebugInfo gamerule to determine if coordinates should be shown
allow to explicitly configure if coordinates should be shown or not
for players with invunload.coordinates permission always show coordinates regardless of the configured option
@@ -30,7 +32,7 @@ public class Main extends JavaPlugin implements Listener {
int mcMinorVersion; // 14 for 1.14, 13 for 1.13, ...

@SuppressWarnings("FieldCanBeLocal")
private final int currentConfigVersion = 34;
private final int currentConfigVersion = 37;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new config version is set to 37 instead of just incremented by one because the latest version (5.0.2) published on spigot.org has it set to 36. It looks like the code in repo doesn't contain changes from the v5.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant